package jp.bluecab.bluecabsystem.locrecserv.classes;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class GPSRecord {
	
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	
	@Persistent
	private long loginid; // ログインID
	
	@Persistent
	private double latitude; // 緯度
	
	@Persistent
	private double longitude; // 経度
	
	@Persistent
	private double orientation; // 方位
	
	@Persistent
	private int operationmode; // ステータス
	
	@Persistent
	private Date createdAt; // 送信日時
	
	public GPSRecord(long user, double lat, double lng, double ori, int op, Date nowdatetime) {
		this.loginid = user;
		this.latitude = lat;
		this.longitude = lng;
		this.orientation = ori;
		this.operationmode = op;
		this.createdAt = nowdatetime;
	}
	
	public Long getId() {
		return id;
	}
	
	public void setLatitude(double latitude) {
		this.latitude = latitude;
	}
	
	public double getLatitude() {
		return latitude;
	}
	
	public void setLongitude(double longitude) {
		this.longitude = longitude;
	}
	
	public double getLongitude() {
		return longitude;
	}
	
	public void setDate(Date date) {
		this.createdAt = date;
	}
	
	public Date getDate() {
		return createdAt;
	}
	
	public void setUser(long user) {
		this.loginid = user;
	}
	
	public long getUser() {
		return loginid;
	}
	
	public double getOrientation() {
		return orientation;
	}
	
	public long getLoginid() {
		return loginid;
	}
	
	public void setLoginid(long loginid) {
		this.loginid = loginid;
	}
	
	public int getOperationmode() {
		return operationmode;
	}
	
	public void setOperationmode(int operationmode) {
		this.operationmode = operationmode;
	}
	
	public Date getCreatedAt() {
		return createdAt;
	}
	
	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}
	
	public void setOrientation(double orientation) {
		this.orientation = orientation;
	}
}
